projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f48a1e4
)
broadway: Correct handling of opaque colors
author
Alexander Larsson
<alexl@redhat.com>
Wed, 26 Aug 2020 10:18:28 +0000
(12:18 +0200)
committer
Alexander Larsson
<alexl@redhat.com>
Wed, 26 Aug 2020 10:18:28 +0000
(12:18 +0200)
If alpha is 255, we use rgb() instead of rgba(), not if alpha is 0.
This makes the title bar gradient go from fully transparent to blue
rather than black to blue..
gdk/broadway/broadway.js
patch
|
blob
|
history
diff --git
a/gdk/broadway/broadway.js
b/gdk/broadway/broadway.js
index 21554546c2a1fff58c849a7450303345b2e6be40..dcbe42f8d15f9b2b4b629bfc90d5a1bd54d26b57 100644
(file)
--- a/
gdk/broadway/broadway.js
+++ b/
gdk/broadway/broadway.js
@@
-396,7
+396,7
@@
TransformNodes.prototype.decode_color = function() {
var g = (rgba >> 8) & 0xff;
var b = (rgba >> 0) & 0xff;
var c;
- if (a ==
0
)
+ if (a ==
255
)
c = "rgb(" + r + "," + g + "," + b + ")";
else
c = "rgba(" + r + "," + g + "," + b + "," + (a / 255.0) + ")";